<%@ Page Language="C#" MasterPageFile="~/SFMaster.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Photos_Default" %>

<%@ Register Src="/UserControls/uctPhotoAlbums.ascx" TagName="uctPhotoAlbums" TagPrefix="uc2" %>
<%@ Register Assembly="WebControls" Namespace="WebControls" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="Server">
<asp:Panel ID=pblPhotosMain runat=server>
    <cc1:SFDataList Width="100%" ID="sflPhotos" runat="server" RepeatDirection="Horizontal"
        RepeatColumns="4" OnNeedsDataSource="sflPhotos_NeedsDataSource" ItemStyle-Width="25%"
        ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="Top" OnItemCommand="sflPhotos_ItemCommand" OnItemDataBound="sflPhotos_ItemDataBound">
        <ItemTemplate>
            <asp:ImageButton ID="imgPhoto" runat="server" ImageUrl='<%#GeneratePhotoUrl(DataBinder.Eval(Container.DataItem,"PhotoPath")) %>'
                CommandName="Preview" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"PhotoId") %>' /><br />
            <div class="panelPhotosShowAll">
                <a runat="server" href='<%#GenerateAlbumUrl(DataBinder.Eval(Container.DataItem,"PhotoAlbumId")) %>'>
                    <%#DataBinder.Eval(Container.DataItem, "PhotoAlbumName")%>
                </a>
            </div>
            <%#DataBinder.Eval(Container.DataItem,"PhotoName") %>
        </ItemTemplate>
    </cc1:SFDataList>
    <center>
    <asp:DataList ID="rptPages" runat="server" ItemStyle-Width="15px" RepeatDirection="Horizontal" OnItemCommand="rptPages_ItemCommand">
        <ItemTemplate>
            <asp:LinkButton ID="lbtPagenumber" runat="server" CommandName="ChangePage" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"PageNumber") %>'
                Text='<%#DataBinder.Eval(Container.DataItem,"PageNumber") %>' Enabled='<%#GetEnabled(DataBinder.Eval(Container.DataItem,"PageNumber")) %>'></asp:LinkButton>
        </ItemTemplate>
    </asp:DataList>
    </center>
    </asp:Panel>
   
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderArchive" runat="Server">
    <uc2:uctPhotoAlbums ID="UctPhotoAlbums1" runat="server"></uc2:uctPhotoAlbums>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderEdit" runat="Server">
</asp:Content>
